/*
 *  test.c
 *
 *  This code contains the main function of a test program.
 *
 *  Copyright (C) 2010 LIMSI-CNRS (Orsay-France) and EFREI (Paris-France)
 *
 *  Authors: Rami Ajaj, Nicolas Flasque and Frederic Vernier.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as
 *  published by the Free Software Foundation; either version 2.1 of the
 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  $Id$
 */

#include "TUIO_receiver.h"
#include "MTouchware_handlers.h"
#include "MTouchware_senders.h"
#include "MTouchware_control_receiver.h"


int main(int argc, char *argv[]){
	char* control_port="1979";
	char* output_port="1978";
	// pthread needed for the MTouchware control receiver
	pthread_t control_receiver_thread;
	int thread_id;
	char *nothing=NULL;
	
	CONTROL_IN_PORT = control_port;
	thread_id = pthread_create( &control_receiver_thread, NULL, MTouchware_control_receiver , (void*) nothing); //creating the MTouchware_control_receiver

	create_MTouchware_senders("129.175.156.70",output_port); //creating the sender
	
	TUIO_receiver(); // creating TUIO_receiver
	delete_MTouchware_senders();
	return 0;
}
